# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=chromefreak
pkgver=24.12745b1
pkgrel=6
groups=('blackarch' 'blackarch-forensic')
pkgdesc='A Cross-Platform Forensic Framework for Google Chrome'
arch=('any')
depends=('python2' 'python2-simplejson' 'python2-pysqlite')
makedepends=('git')
url='http://osandamalith.github.io/ChromeFreak/'
license=('custom')
source=("$pkgname::git+https://github.com/OsandaMalith/ChromeFreak.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|bin/python$|bin/python2|' ChromeFreak.py
}

package() {
  cd $pkgname

  install -Dm 755 ChromeFreak.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
  install -Dm 755 EXE/ChromeFreak.exe \
    "$pkgdir/usr/share/windows/$pkgname/chromefreak.exe"
}

